/**
 * 用户
 * WangPeixi
 */
var id = "";
var addForm = "";
$(function(){
	id = request.QueryString("id");//从跳转页面过来的
	addForm = $("#addForm");
	$("#btncancel").click(function(){
		loadInfo();
	});
	loadInfo();
	addForm.form("disableValidation");
	
});

function loadInfo(){
	var data = new Object();
	data.id=id;
	addForm	.form('load',{
		id:data.id
	});
}
/**
 * 刷新grid
 */
function reloadGird() {
	gridReload("inventoryList");
}



function addBankAccount(){
		if(addForm.form('enableValidation')){
			addForm.form('submit',{
				url:'/addInventoryNumber',
				success:function(msg){
					msg = $.parseJSON(msg);
					if(msg.returnCode == '00'){
						top.showMessage("入库成功!");
						closeIframeWindow();
						reloadGird();
					}else{
						top.showMessage("<font color='red'>" + msg.returnMsg  + "</font>!");
					}	
				}
			});
		}
}
